
#ifndef PARTICLE_SYSTEM_HPP
#define PARTICLE_SYSTEM_HPP

#include <vector>
using namespace std;

#include "Particle.hpp"
#include "ParticleEmitter.hpp"
#include "ParticleAttractor.hpp"

class ParticleEmitter;
class ParticleAttractor;

class ParticleSystem{
    friend class ParticleEmitter;
    friend class ParticleAttractor;

    public:
    ParticleSystem();
    ~ParticleSystem();

    void update();
    void output();
    void output_particles(unsigned int a, unsigned int b);

    void add_emitter(ParticleEmitter *emitter);
    void add_attractor(ParticleAttractor *attractor);

    void set_gravity(float newgrav);

    unsigned int max_particles;

    vector<Particle*> particles;
    vector<ParticleEmitter*> emitters;
    vector<ParticleAttractor*> attractors;

    private:
    float gravity;
    float gravity_direction;
    float gravity_cos, gravity_sin;
};



#endif // PARTICLE_SYSTEM_HPP
